{extend name="public:layout" /}
{block name="title"}添加{$moudleName}{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li>
                    <i class="fa fa-hand-o-right"></i>
                    <a href="{:url('index',['mid'=>$Request.param.mid,'cid'=>$Request.param.cid])}">{$moudleName}列表</a>
                </li>
                <li class="active">添加{$moudleName}</li>
            </ol>
        </div>
        <div class="ibox-content">
            <form method="post" class="form-horizontal" id="form">
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">司机姓名</label>
                    <div class="col-sm-3">
                        <input class="form-control" type="text" placeholder="" name="title" value="" datatype="*" />
                    </div>
                    <label class="col-sm-2 control-label Validform_label">司机电话</label>
                    <div class="col-sm-3">
                        <input class="form-control" type="text" placeholder="司机电话" name="dri_phone" value="" datatype="*,s" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">驾驶证号</label>
                    <div class="col-sm-3">
                        <input class="form-control" type="text" placeholder="驾驶证号" name="dri_license" value="" datatype="*" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">司机状态</label>
                    <div class="col-sm-3">
                        <label class="radio-inline i-checks">
                        <input type='radio' name="dri_status" value="0" /> 出车
                        </label>
                        <label class="radio-inline i-checks">
                            <input type='radio' name="dri_status" value="1" /> 请假
                        </label>
                        <label class="radio-inline i-checks">
                            <input type='radio' name="dri_status" value="2" checked/> 空闲
                        </label>
                    </div>
                    <label class="col-sm-2 control-label Validform_label">绑定管理员</label>
                    <div class="col-sm-3">
                        <input type="text" name="bind_uid" id="select-bind_uid" placeholder="请输入姓名检索" data-init="" style="width:100%;" />
                        <script>
                            In('selectpage',function(){
                                var options={
                                    keyField:'uid',
                                    showField:'username',
                                    multiple:false,
                                    pagination:true,
                                    data:'/system/logic.select/selectsj',
                                    andOr:'OR',
                                    params : function(){return {'searchField':'name'}},
                                    eAjaxSuccess : function(data){
                                        if(data.totalRow>0){
                                            return data;
                                        }else{
                                            return false;
                                        }
                                    },
                                    formatItem : function(data){
                                        return data.username+'('+data.name+')';
                                    }
                                };
                                $('#select-bind_uid').selectPage(options);
                            })
                        </script>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">基本工资</label>
                    <div class="col-sm-3">
                        <input class="form-control" type="text" placeholder="基本工资" name="driver_wages" value="0" datatype="*" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">里程补贴</label>
                    <div class="col-sm-3">
                        <input class="form-control" type="text" placeholder="百公里补贴金额" name="km_subsidy" value="0" datatype="*" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">工作状态</label>
                    <div class="col-sm-4">
                        <label class="radio-inline i-checks"><input type='radio' name="work_status" value="0" /> 离职</label>
                        <label class="radio-inline i-checks"><input type='radio' name="work_status" value="1" checked/> 在职</label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">排序</label>
                    <div class="col-sm-3">
                        <input class="form-control" type="text" placeholder="" name="sort" value="0" datatype="*" />
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-10 col-sm-offset-2">
                        <button class="btn btn-primary" id="btnSub" type="button">保存</button>
                        <a href="{:url('index',['mid'=>$Request.param.mid])}" class="btn btn-white">取消</a>
                        <span id="validError"></span>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    $(function () {
        iCheck();
        formatDate();
        ajaxSubForm('#btnSub');
    });
</script>
{/block}